//
//  BaseVC.m
//  UILbrary
//
//  Created by Apple on 2022/5/14.
//  Copyright © 2022 mac. All rights reserved.
//

#import "BaseVC.h"
#import "ExplainViewHandle.h"

@interface BaseVC ()

@property (nonatomic ,strong) ExplainViewHandle *explain;
@property (nonatomic ,copy) NSString *explainString;

@end

@implementation BaseVC

- (instancetype)init
{
    self = [super init];
    if(self){
        NSString *selectorString = NSStringFromSelector(@selector(configExplain:));
        _explainString = [NSString stringWithFormat:@"请通过 方法: %@ 配置内容",selectorString];
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self.explain addToView:self.view];
}


//MARK: - Public

- (void)showExplain:(BOOL)show
{
    [[self.explain view] setHidden:!show];
}

// demo 说明文字
- (void)configExplain:(NSString *)explain
{
    [self.explain configText:explain];
}

- (NSString *)p_explainString
{
    return @"p_explainString";
}

//MARK: - get

- (ExplainViewHandle *)explain
{
    if(!_explain){
        _explain = [ExplainViewHandle new];
    }
    return _explain;
}


@end
